{* load lang file *}
{config_load file="lang`$smarty.const.PLANG`.txt" section="section"}

{foreach from=$data item=entry}
<!-- start entry: {$entry.id} -->
	<div class="post-{$entry.id} post" style="margin-bottom: 40px;">
		<div class="p-head">
		<h2><a href="{$entry.url|regex_replace:'/\.html/':'/'}" rel="bookmark" title="Permanent Link to {$entry.subject}">{$entry.subject}</a></h2>
		{if $entry.section}
		<p class="p-cat">In: <a href="{$SERVER_ROOT}{$entry.section.name}/" title="View all posts in {$entry.section.fullName}" rel="category tag">{$entry.section.fullName}</a></p>
		{/if}
		<small class="p-time">
		<strong class="day">{$entry.intime|date_format:'%d'}</strong>
		<strong class="month">{$entry.intime|date_format:'%b'}</strong>
		<strong class="year">{$entry.intime|date_format:'%Y'}</strong>
		</small>
		</div>


		<div class="p-con">
			{if $entry.image}<img src="{$SERVER_ROOT}thumb/{$entry.id}/" align="left" hspace="10" vspace="4" alt="Icon" />{/if}
			{$entry.content}
		<div class="clear"></div>
		</div>

		<div class="p-det">
		 <ul>
		   <li class="p-det-com">
		   {if $entry.commentcount > 0}<span><a href="{$entry.url}#comments" title="Comment on {$entry.subject}">{$entry.commentcount} {#comments#}</a></span>{else}<a href="{$entry.url}#comments">{#noComments#}</a>{/if}
		   </li>
			{if $entry.keywords}
				<li class="p-det-tag">
				{foreach from=$entry.keywords item=keyword name=myKeys}
					{if not $smarty.foreach.myKeys.last}
					<a href="{$SERVER_ROOT}keyword/{$keyword.link}/" rel="tag">{$keyword.word}</a>,
					{else}
					<a href="{$SERVER_ROOT}keyword/{$keyword.link}/" rel="tag">{$keyword.word}</a>
					{/if}
				{/foreach}
			{else}
				<li class="p-det-tag">
				{#noTags#}
			{/if}

			
			
		   </li>
		  </ul>
		  
		  <!-- {if $data.ljurl} | <a href="http://www.livejournal.com/users/{$smarty.const.LJ_USER}/{$entry.ljurl}.html">@<b>lj</b></a>{/if} -->
		  
		  {dynamic}
			{if $smarty.session.admin}
			<div class="adminm">[ <a href="{$entry.url|regex_replace:'/\.html/':'/'}delete/" OnClick="return confirmLink(this,'{#youSure#}');">{#delete#}</a> : <a class="post-edit-link" href="{$entry.url|regex_replace:'/\.html/':'/'}edit/">{#edit#}</a> ]</div>
			{/if}
			{/dynamic}
		</div>

	</div>

<!-- end entry: {$entry.id} -->

{foreachelse}
	<div class="post wrap">
		<h2>{#noJoy#}</h2>
		<p>{#explained#}</p>
	</div>
{/foreach}

{* figure out pager behaviour *}
{if $smarty.const.ENABLE_PAGERS and $pagerTotal > $smarty.const.PER_PAGE}
	<div class="more_posts">
		<h2>{include file="pagers.htm"}</h2>
	</div>
{/if}